Programmable quantization dead zone and threshold for standard-based h.264 and/or vc1 video encoding

ABSTRACT

A video encoder including an encoder circuit, a quantizer circuit and a control circuit. The encoder circuit may be configured to generate a plurality of coefficient values and motion vectors in response to a video stream, a first control signal, a second control signal, and a number of quantized values. The control circuit may be configured to (i) generate the first control signal, the second control signal, and a quantizer index signal and (ii) set two or more quantization dead zones and two or more offsets to different values, where the quantization dead zones and the offsets are independently programmable. The quantizer circuit may be configured to generate the number of quantized values in response to the coefficient values, the quantizer index signal, the two or more quantization dead zones and the two or more offsets. A first coefficient value may be quantized using a first quantization dead zone and a first offset. A second coefficient value may be quantized using a second quantization dead zone and a second offset. The first and second quantization dead zones generally have different values. The first and second offsets generally have different values. Quantization calculations determining each quantized value take into account respective quantization dead zones and offsets.

This is a continuation of U.S. Ser. No. 11/010,029, filed Dec. 10, 2004,which is incorporated by reference.

FIELD OF THE INVENTION

The present invention relates to video encoding generally and, moreparticularly, to a programmable quantization dead zone and threshold forstandard-based H.264 and/or VC1 video encoding.

BACKGROUND OF THE INVENTION

Video picture quality can be decreased by aliasing. Aliasing refers todefects or distortion in a video picture due to sampling limitations.The defects commonly appear as jagged edges on diagonal lines andtwinkling or brightening (beating/pulsing) in picture detail.

In the H.264 specification, I-frame beating/pulsing is a significantproblem, more so than with other video compression standards. The mainsource of the problem in H.264 is poor DC quantization in the coded bitstream. Poor DC quantization occurs because the H.264 specification doesnot provide explicit syntax to support finer DC quantization (i.e.,quantization matrices and/or DC quantization).

The VC1 specification has separate quantization for AC and DCcoefficients. However, VC1 does not have separately controllablequantization for every separate frequency component. The quantization oflower frequency AC coefficient can be relatively poor in VC1.

It would be desirable to implement a video encoder with a programmablequantization dead zone and thresholds for standard-based H.264 and/orVC1 video encoding.

SUMMARY OF THE INVENTION

The present invention concerns a video encoder including an encodercircuit, a quantizer circuit and a control circuit. The encoder circuitmay be configured to generate a plurality of coefficient values andmotion vectors in response to a video stream, a first control signal, asecond control signal, and a number of quantized values. The controlcircuit may be configured to (i) generate the first control signal, thesecond control signal, and a quantizer index signal and (ii) set two ormore quantization dead zones and two or more offsets to differentvalues, where the quantization dead zones and the offsets areindependently programmable. The quantizer circuit may be configured togenerate the number of quantized values in response to the coefficientvalues, the quantizer index signal, the two or more quantization deadzones and the two or more offsets. A first coefficient value may bequantized using a first quantization dead zone and a first offset. Asecond coefficient value may be quantized using a second quantizationdead zone and a second offset. The first and second quantization deadzones generally have different values. The first and second offsetsgenerally have different values. Quantization calculations determiningeach quantized value take into account respective quantization deadzones and offsets.

The objects, features and advantages of the present invention includeproviding programmable quantization dead zones and thresholds forstandard-based H.264 and/or VC1 video encoding that may (i) adjustquantization dead zones, (ii) adjust quantization decision levels (orthresholds), (iii) improve I-frame visual quality, (iv) reduce I-framebeating and/or pulsing, (v) improve quantization of lower frequency ACcoefficients in VC1, (vi) improve rate-distortion performance and/or(vii) improve overall visual quality.

BRIEF DESCRIPTION OF THE DRAWINGS

These and other objects, features and advantages of the presentinvention will be apparent from the following detailed description andthe appended claims and drawings in which:

FIG. 1 is a block diagram illustrating various components of acompressed video system in accordance with a preferred embodiment of thepresent invention;

FIG. 2 is a more detailed block diagram illustrating a video encoder inaccordance with a preferred embodiment of the present invention; and

FIG. 3 is a diagram illustrating an example of forward quantizationparameters.

DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS

Referring to FIG. 1, a block diagram of a system 100 is shownillustrating components of a compressed video system in accordance witha preferred embodiment of the present invention. In general, a contentprovider 102 presents video image, audio or other data to be compressedand transmitted in a data stream 104 to an input of an encoder 106. Theencoder 106 may be configured to generate a compressed bit stream 108 inresponse to the input stream 104. In one example, the encoder 106 maybeconfigured to encode the data stream 104 according to one or moreencoding standards (e.g., MPEG-1, MPEG-2, MPEG-4, WMV, VC-9, VC-1,H.262, H.263, H.264, H.264/JVC/AVC/MPEG-4 part 10, AVS 1.0 and/or otherstandards for compression of audio-video data). The encoder 106 may befurther configured to generate the bit stream 108 using a quantizationprocess implemented with a programmable dead zone and thresholds.

The compressed bit stream 108 from the encoder 106 may be presented toan encoder transport system 110. An output of the encoder transportsystem 110 generally presents a signal 112 to a transmitter 114. Thetransmitter 114 transmits the compressed data via a transmission medium116. In one example, the content provider 102 may comprise a videobroadcast, DVD, or any other source of video data stream. Thetransmission medium 116 may comprise, for example, a broadcast, cable,satellite, network, DVD, hard drive, or any other medium implemented tocarry, transfer, and/or store a compressed bit stream.

On a receiving side of the system 100, a receiver 118 generally receivesthe compressed data bit stream from the transmission medium 116. Thereceiver 118 presents an encoded bit stream 120 to a decoder transportsystem 122. The decoder transport system 122 generally presents theencoded bit stream via a link 124 to a decoder 126. The decoder 126generally decompresses (decodes) the data bit stream and presents thedata via a link 128 to an end user hardware block (or circuit) 130. Theend user hardware block 130 may comprise a television, a monitor, acomputer, a projector, a hard drive, a personal video recorder (PVR), anoptical disk recorder (e.g., DVD), or any other medium implemented tocarry, transfer, present, display and/or store the uncompressed bitstream (e.g., decoded video signal).

Referring to FIG. 2, a more detailed block diagram of the circuit 106 ofFIG. 1 implemented in accordance with a preferred embodiment of thepresent invention is shown. The circuit 106 may be implemented as avideo encoder. In one example, the circuit 106 may be compliant with oneor more compression standards (e.g., H.264, VC1, and/or otherspecifications). The present invention generally relates to encodingrules for forward quantization. The present invention generally providesa flexible design for a quantization process that may achieve bettervideo compression in standard based video encoding.

The circuit 106 may comprise a circuit (or block) 132, a circuit (orblock) 134, a circuit (or block) 136 and a circuit (or block) 138. Theblock 132 may be implemented as an encoder/decoder (CODEC) circuit. Theblock 134 may be implemented as a quantizer circuit. The block 136 maybe implemented as a coding control circuit. the block 138 may beimplemented as an entropy coding block.

The circuit 132 may have an input 140 that may receive a signal (e.g.,VIDEO IN), an output 142 that may present a signal (e.g., COEFF), anoutput 144 that may present a signal (e.g., MV) and an input 146 thatmay receive a signal (e.g., QUANTIZED VALUES). The signal VIDEO IN maycomprise a video bit stream. The signal QUANTIZED VALUES may comprise anumber of quantized values for transform coefficients. The signal MV maycomprise a number of motion vectors. The block 132 may be configured togenerate the signal COEFF and the signal MV in response to the signalVIDEO IN, the signal QUANTIZED VALUES and one or more control signals(e.g., CTR1 and INTER/INTRA) received from the block 136. In general,the block 132 may be implemented with conventional techniques.

The circuit 134 may have a first input that may receive the signalCOEFF, a second input that may receive a signal (e.g., DEADZONES/THRESHOLDS), a third input that may receive a signal (e.g.,QUANTIZER INDEX) and an output that may present the signal QUANTIZEDVALUES. The signal DEAD ZONES/THRESHOLDS may be configured to signal (orset) quantization dead zones and thresholds of the circuit 134. Thesignal DEAD ZONES/THRESHOLDS may comprise information for programmingone or more quantization dead zones and/or thresholds. In one example,the signal DEAD ZONES/THRESHOLDS may be configured to select between anumber of predetermined quantization parameters. The circuit 134 may beconfigured to generate the signal QUANTIZED VALUES in response to thesignal COEFF, the signal DEAD ZONES/THRESHOLDS and the signal QUANTIZERINDEX.

The circuit 136 may have a first output that may present the controlsignal CTR1, a second output that may present the signal DEADZONES/THRESHOLDS, a third output that may present the signal QUANTIZERINDEX, a fourth output that may present the signal INTER/INTRA and afifth output that may present a signal (e.g., TRANSMITTED OR NOT). Thesignal INTER/INTRA may be implemented, in one example, as a decisionflag. The signal TRANSMITTED OR NOT may be implemented, in one example,as a status flag. The signal CTR1 may be configured, in one example, tocontrol a transformation process of the block 132. For example, thesignal CTR1 may be configured to select between 8×8 and 4×4 transforms.

The circuit 136 may be configured, in one example, to generate thesignals CTR1, INTER/INTRA, TRANSMITTED OR NOT, and QUANTIZER INDEXaccording to conventional techniques. The circuit 136 may be furtherconfigured, in one example, to generate the signal DEAD ZONES/THRESHOLDSin accordance with the present invention. In one example, the circuit136 may be configured to generate the signal DEAD ZONE/THRESHOLDS usinga number of different algorithms.

For example, the signal DEAD ZONES/THRESHOLDS may be varied for eachmacroblock, or may be fixed. In one example, statistics (e.g., mean,variance, etc.) of the original macroblocks (e.g., for intra or inter)or residual macroblocks (e.g., for inter) may be utilized to determineoffset and threshold values. In another example, the offset andthreshold values may be determined empirically (e.g., byexperimentation). In one example, fixed values may be used for intra andinter, or fixed for a specific sequence type. For example, a videosequence classification may be used to determine the offset and/orthreshold values. Also, quantization alone may be performed repeatedlywith different values. In one example a measure of rate-distortionperformance may be used in determining offset and threshold values. Forexample, a set of offset and threshold values may be selected fordetermining final quantized coefficients from a plurality of sets basedon obtaining the best rate-distortion performance.

The block 138 may be implemented using conventional techniques. In oneexample, the block 138 may be configured to generate a compressed bitstream using one or more of variable length codes (VLC),context-adaptive variable length coding (CAVLC) and/or context-adaptivebinary arithmetic coding (CABAC). The block 138 may be configured togenerate the compressed bit stream in response to the signalsINTER/INTRA, TRANSMITTED OR NOT, QUANTIZER INDEX, QUANTIZED VALUES andMV.

In one example, the circuit 132 may comprise a block (or circuit) 160, ablock (or circuit) 162, a block (or circuit) 164, a block (or circuit)166, a block (or circuit) 168, a block (or circuit) 170, a block (orcircuit) 172 and a block (or circuit) 174. The block 160 may beimplemented as a subtractor. The block 162 may be implemented as amultiplexer (or selector) circuit. The block 164 may be implemented as atransform block. In one example, the block 164 may be configured toperform a discrete cosine transform (DCT). The block 166 may beimplemented as an inverse quantizer block. The block 168 may beimplemented as an inverse transform block. In one example, the block 168may be implemented as an inverse discrete cosine transform (IDCT) block.The block 170 may be implemented as an adder. The block 172 may beimplemented as a picture memory. The block 174 may be implemented as amultiplexer (or selector) circuit. Other blocks or circuits may beimplemented accordingly to meet the design criteria of a particularimplementation.

The signal VIDEO_IN may be presented to a first input of the block 160and a first input of the block 162. An output of the block 160 maypresent a signal to a second input of the block 162. The block 162 maybe configured to couple either the first input or the second input to anoutput in response to the signal INTER/INTRA. The output of the block162 may be presented to an input of the block 164. The block 164 may beconfigured to transform the signal received from the block 162 basedupon the signal CTR1. An output of the block 164 may present the signalCOEFF.

The block 166 may have an input that may receive the signal QUANTIZEDVALUES. An output of the block 166 may be presented to an input of theblock 168. An output of the block 168 may be presented to a first inputof the block 170. An output of the block 170 may be presented to a firstinput of the block 172. The block 172 may have a first output that maypresent the signal MV, a second input that may receive the signal VIDEOIN and a second output that may present a signal to a second input ofthe block 160 and a first input of the block 174. An output of the block174 may be presented to a second input of the block 170. The blocks160-174 may be implemented using conventional techniques for block-basedvideo encoders. Motion estimation and compensation may be implementedwith conventional techniques. However, the implementation of motionestimation and compensation may vary substantially from one encoder toanother encoder to meet the design criteria of a particularimplementation.

Video compression standards (e.g., MPEG2, MPEG4, H.264, VC1, etc.)generally define a video decoder syntax and decoding process. As part ofthe decoding process, inverse quantization is generally defined in thestandard. However, video encoding implementation is generally moreflexible. For example, different encoders may implement forwardquantization rules differently. Quantization as used herein generallyrefers to the process of assigning a range of coefficient levels to apredetermined reconstructed level that may be obtained from aquantization parameter.

Referring to FIG. 3, a diagram 200 is shown illustrating an examplerelationship between quantization parameters and coefficient levels. Ingeneral, coefficient values falling within a pair of decision thresholds(e.g., [D_(n), D_(n+1)]) are generally assigned a correspondingquantized value (e.g., Q_(n)). Conventional implementations of forwardquantization have fixed decision thresholds. The present inventiongenerally provides a process for forward quantization that allows forvarying the decision thresholds D₁-D_(n) (also called “offsets”) and thedecision threshold D₀ around zero (also called “dead zone”)independently for (i) all coefficients, (ii) luminance blocks and/or(iii) chrominance blocks.

In one example, a different quantization dead zone and a differentquantization offset may be selected for different coefficients in ablock. For example, a first coefficient in a block may be quantizedusing a first offset threshold value and a first dead zone thresholdvalue. A second coefficient in the block may be quantized using a secondoffset threshold value and/or a second dead zone threshold value. Thefirst and second offset values may be independently programmed. Thefirst and second dead zone values may be independently programmed. Thedead zone threshold values and offset threshold values may beindependently programmed to different values.

In one example, the present invention may be implemented in an H.264compliant encoder/decoder. In general, H.264 uses a 4×4 transform. The4×4 transform produces 16 coefficients per block. H.264 also uses oneluminance (luma or Y) and two chrominance (Cb an Cr) blocks for a 4×4pixel area. H.264 may also implement 16×16 blocks. In H.264, the DCtransformed coefficients for a 16×16 block are generally grouped into a4×4 block of DC coefficients, and transformed and quantized again. In apreferred embodiment of the present invention, a different set ofoffsets and dead zone may be implemented for the latter step. In anotherexample, the present invention may be implemented in a VC-1 compliantencoder/decoder. Examples of a transform/quantization process inaccordance with preferred embodiments of the present invention arepresented below.

In one example, an encoder in accordance with the present invention mayimplement H.264 forward transform and quantization similar to thatdescribed in the Joint Video Team (JVT) document JVT-B039.doc entitled“Low Complexity Transform and Quantization—Part II: Extensions” (whichis hereby incorporated by reference in its entirety) with the exceptionof (i) material regarding residuals>9 bits, (ii) proposed changes to thestandard that were not adopted and (iii) implementation of programmableoffsets and thresholds. As used herein, the symbol // denotes divisionwith rounding to the nearest integer:

a//2^(b)=sign(a)×[(abs(a)+2^(b−1))>>b]

Quantization in accordance with the present invention may beimplemented, in one example, with 126-bits for programmable parametersets (e.g., 18 3-bit offsets and 18 4-bit deadzones). In one example,the present invention may implement 16 parameter sets for 8×8 or 4×4luma and chroma quantization (e.g., O_(ij) and d_(ij)), 1 parameter setfor 2×2 chroma DC quantization (e.g., O_(CDC) and d_(CDC)), and 1parameter set for 4×4 luma DC quantization (e.g., O_(LDC) and d_(LDC)).

In one example, a forward transform for 4×4 luma and chroma may bedefined by the following equation:

$Y = {{\begin{bmatrix}1 & 1 & 1 & 1 \\2 & 1 & {- 1} & {- 2} \\1 & {- 1} & {- 1} & 1 \\1 & {- 2} & 2 & {- 1}\end{bmatrix}\begin{bmatrix}x_{00} & x_{01} & x_{02} & x_{03} \\x_{10} & x_{11} & x_{12} & x_{13} \\x_{20} & x_{21} & x_{22} & x_{23} \\x_{30} & x_{31} & x_{32} & x_{33}\end{bmatrix}}\begin{bmatrix}1 & 2 & 1 & 1 \\1 & 1 & {- 1} & {- 2} \\1 & {- 1} & {- 1} & 2 \\1 & {- 2} & 1 & {- 1}\end{bmatrix}}$

Quantization for the 4×4 luma and chroma may be performed according tothe following equation:

${{Y_{QQ}\left( {i,j} \right)} = {\begin{bmatrix}{{Y{\left( {i,j} \right) \cdot Q}\left( {{{QP}\mspace{11mu} {\% 6}},i,j} \right)} +} \\\left( {\begin{pmatrix}{\left( {{{Off}\left( {i,j} \right)} + 1} \right) \cdot} \\2^{17 + {{QP}/6}}\end{pmatrix}/16} \right)\end{bmatrix}/2^{17 - 3 + {{QP}/6}}}},i,{j = {0\mspace{14mu} \ldots \mspace{14mu} 3}}$${Y_{Q}\left( {i,j} \right)} = \left\{ \begin{matrix}{0,} & {{{if}\mspace{14mu} {{abs}\left( {Y_{QQ}\left( {i,j} \right)} \right)}} \leq {7 + {{DZ}\left( {i,j} \right)}}} \\{{{Y_{QQ}\left( {i,j} \right)}/8},} & {else}\end{matrix} \right.$

where Y represents the transformed coefficients, Q represents thequantization coefficients, Off(i,j) has the same sign as the coefficientthat is being quantized and a value +1 is added to the parameterOff(i,j). In one example, the quantization coefficients Q may be set asfollows:

-   -   Q[QP %6][i][j]=quantMat[QP %6][0] for (i,j)={(0,0), (0,2),        (2,0), (2,2)},    -   Q[QP %6][i][j]=quantMat[QP %6][1] for (i,j)={(1,1), (1,3),        (3,1), (3,3)},    -   Q[QP %6][i][j]=quantMat[QP %6][2] otherwise.    -   R[QP %6][i][j]=dequantMat[QP %6][0] for (i,j)={(0,0), (0,2),        (2,0), (2,2)},    -   R[QP %6][i][j]=dequantMat[QP %6][1] for (i,j)={(1,1), (1,3),        (3,1), (3,3)},    -   R[QP %6][i][j]=dequantMat[QP %6][2] otherwise.    -   quantMat[6][3]={{13107, 5243, 8066}, {11916, 4660, 7490},        {10082, 4194, 6554}, {9362, 3647, 5825}, {8192, 3355, 5243},        {7282, 2893, 4559}};    -   dequantMat[6][3]={{10, 16, 13}, {11, 18, 14}, {13, 20, 16}, {14,        23, 18}, {16, 25, 20}, {18, 29, 23}}.

The sixteen 3-bit programmable offsets O_(ij) for 4×4 luma and chromaquantization may be utilized according to the following equation:

${{{Off}\left( {i,j} \right)} = {{{sgn}\left( {Y\left( {i,j} \right)} \right)} \cdot {O_{1}\left( {i,j} \right)}}},\mspace{14mu} {{{where}\mspace{14mu} O_{1}} = \begin{bmatrix}o_{00} & o_{01} & o_{02} & o_{03} \\o_{10} & o_{11} & o_{12} & o_{13} \\o_{20} & o_{21} & o_{22} & o_{23} \\o_{30} & o_{31} & o_{32} & o_{33}\end{bmatrix}}$

where O_(ij)=0 . . . 7. For example, for smaller sum of absolutedifferences (SAD) blocks and/or non-reference blocks (e.g. B-frames), O₁may be implemented as follows:

$O_{1} = \begin{bmatrix}7 & 3 & 3 & 1 \\3 & 3 & 3 & 1 \\3 & 3 & 3 & 1 \\1 & 1 & 1 & 1\end{bmatrix}$

while for all other cases, O₁ may have the following value:

$O_{1} = \begin{bmatrix}7 & 5 & 5 & 3 \\5 & 5 & 5 & 3 \\5 & 5 & 5 & 3 \\3 & 3 & 3 & 1\end{bmatrix}$

where variance and significance change for non reference blocks. In anexample where variance differs for intra blocks, the matrix O₁ may beimplemented for intra blocks as follows:

$O_{1} = \begin{bmatrix}7 & 6 & 5 & 4 \\6 & 5 & 4 & 3 \\5 & 4 & 3 & 2 \\4 & 3 & 2 & 2\end{bmatrix}$

and for inter blocks as follows:

$O_{1} = \begin{bmatrix}4 & 4 & 3 & 3 \\4 & 3 & 3 & 2 \\3 & 3 & 2 & 1 \\3 & 2 & 1 & 1\end{bmatrix}$

A more sophisticated scheme may be implemented where the matrix ischanged based on reference/non-reference, intra/inter, or use of themacroblock variances and residuals variances directly.

The sixteen 3-bit programmable offsets O_(ij) for 8×8 luma and chromaquantization may be utilized according to the following equation:

${{{Off}\left( {i,j} \right)} = {{{sgn}\left( {Y\left( {i,j} \right)} \right)} \cdot {O_{1}\left( {i,j} \right)}}},\mspace{14mu} {{{where}\mspace{14mu} O_{1}} = \begin{bmatrix}o_{00} & o_{01} & o_{02} & o_{02} & o_{03} & o_{03} & o_{03} & o_{03} \\o_{10} & o_{11} & o_{12} & o_{12} & o_{13} & o_{13} & o_{13} & o_{13} \\o_{20} & o_{21} & o_{22} & o_{22} & o_{23} & o_{23} & o_{23} & o_{23} \\o_{20} & o_{21} & o_{22} & o_{22} & o_{23} & o_{23} & o_{23} & o_{23} \\o_{30} & o_{31} & o_{32} & o_{32} & o_{33} & o_{33} & o_{33} & o_{33} \\o_{30} & o_{31} & o_{32} & o_{32} & o_{33} & o_{33} & o_{33} & o_{33} \\o_{30} & o_{31} & o_{32} & o_{32} & o_{33} & o_{33} & o_{33} & o_{33} \\o_{30} & o_{31} & o_{32} & o_{32} & o_{33} & o_{33} & o_{33} & o_{33}\end{bmatrix}}$

where the values in the square brackets are the same as in the 4×4example above, but i and j=0 . . . 7.

The sixteen 4-bit programmable dead zones d_(ij) for 4×4 luma and chromaquantization may be utilized according to the following equation:

${{{DZ}\left( {i,j} \right)} = {D_{1}\left( {i,j} \right)}},{{{where}\mspace{14mu} D_{1}} = \begin{bmatrix}d_{00} & d_{01} & d_{02} & d_{03} \\d_{10} & d_{11} & d_{12} & d_{13} \\d_{20} & d_{21} & d_{22} & d_{23} \\d_{30} & d_{31} & d_{32} & d_{33}\end{bmatrix}},$

where d_(ij)=0 . . . 15. In one example, for smaller SAD blocks and/ornon-reference blocks (e.g., B-frames), the value of D₁ may be set asfollows:

$D_{1} = \begin{bmatrix}0 & 0 & 0 & 2 \\0 & 0 & 2 & 5 \\0 & 2 & 3 & 5 \\2 & 5 & 5 & 10\end{bmatrix}$

Otherwise, the value of D₁ may be set as follows:

$D_{1} = \begin{bmatrix}0 & 0 & 0 & 1 \\0 & 0 & 1 & 3 \\0 & 1 & 2 & 3 \\1 & 3 & 3 & 6\end{bmatrix}$

The intermediate values inside the square brackets in the aboveequations may have, in one example, a 32-bit range. However, the value Ymay be implemented to fit in 16 bits.

The sixteen 4-bit programmable dead zones d_(ij) for 8×8 luma and chromaquantization may be utilized according to the following equation:

DZ(i, j) = D₁(i, j), where $D_{1} = \begin{bmatrix}d_{00} & d_{00} & d_{00} & d_{00} & d_{01} & d_{01} & d_{02} & d_{03} \\d_{00} & d_{00} & d_{00} & d_{00} & d_{01} & d_{01} & d_{02} & d_{03} \\d_{00} & d_{00} & d_{00} & d_{00} & d_{01} & d_{01} & d_{02} & d_{03} \\d_{00} & d_{00} & d_{00} & d_{00} & d_{01} & d_{01} & d_{02} & d_{03} \\d_{10} & d_{10} & d_{10} & d_{10} & d_{11} & d_{11} & d_{12} & d_{13} \\d_{10} & d_{10} & d_{10} & d_{10} & d_{11} & d_{11} & d_{12} & d_{13} \\d_{20} & d_{20} & d_{20} & d_{20} & d_{21} & d_{21} & d_{22} & d_{23} \\d_{30} & d_{30} & d_{30} & d_{30} & d_{31} & d_{31} & d_{32} & d_{33}\end{bmatrix}$

where the values in the square brackets are the same as in the 4×4example above, but i and j=0 . . . 7.

For 4×4 luma DC transformation and quantization, the luma DCcoefficients of a 16×16 block are grouped into a 4×4 block and furthertransformed, for intra frames, to improve compression. The forwardtransform for 4×4 luma DC transformation may be implemented as follows.The input matrix X_(D) may be formed by picking out DC coefficients fromthe 16 transformed 4×4 blocks. DC coefficients may be transformed, forexample, using a symmetric Hadamard transform. The symmetric Hadamardtransform generally leads to essentially the same performance as theDCT-like transform in TML). The forward transform may be expressed bythe following equation:

$Y_{D} = {\begin{pmatrix}\begin{bmatrix}1 & 1 & 1 & 1 \\1 & 1 & {- 1} & {- 1} \\1 & {- 1} & {- 1} & 1 \\1 & {- 1} & 1 & {- 1}\end{bmatrix} \\{\begin{bmatrix}x_{D\; 00} & x_{D\; 01} & x_{D\; 02} & x_{D\; 03} \\x_{D\; 10} & x_{D\; 11} & x_{D\; 12} & x_{D\; 13} \\x_{D\; 20} & x_{D\; 12} & x_{D\; 22} & x_{D\; 23} \\x_{D\; 30} & x_{D31} & x_{D\; 32} & x_{D\; 33}\end{bmatrix}\begin{bmatrix}1 & 1 & 1 & 1 \\1 & 1 & {- 1} & {- 1} \\1 & {- 1} & {- 1} & 1 \\1 & {- 1} & 1 & {- 1}\end{bmatrix}}\end{pmatrix}//k_{p}}$

with k_(p)=k₉=2. The value p is generally related to a bitdepth of theinput video. For example for 8-bit video the value k₉ is implemented.However, other values may be implemented for 10-bit and/or 12-bit inputvideo.

The 4×4 luma DC quantization may be performed according to the followingequation:

${{Y_{QQD}\left( {i,j} \right)} = \frac{\begin{bmatrix}{{{Y_{D}\left( {i,j} \right)} \cdot {Q\left( {{{QP}\mspace{14mu} \% \mspace{14mu} 6},0,0} \right)}} +} \\\left( {\left( {{{sgn}\left( {Y_{D}\left( {i,j} \right)} \right)} \cdot \left( {o_{LDC} + 1} \right) \cdot 2^{17 + {{QP}/6}}} \right)/16} \right)\end{bmatrix}}{2^{17 - 3 + {{QP}/6}}}},i,{j = {0\mspace{14mu} \ldots \mspace{14mu} 3}}$${Y_{QD}\left( {i,j} \right)} = \left\{ \begin{matrix}{0,} & {{{abs}\left( {Y_{QQD}\left( {i,j} \right)} \right)} \leq {7 + d_{LDC}}} \\{{{Y_{QQD}\left( {i,j} \right)}/8},} & {else}\end{matrix} \right.$

where O_(LDC)=0 . . . 7, d_(LDC)=0 . . . 15 (e.g., O_(LDC)=7,d_(LDC)=0).

The 2×2 chroma DC transform and quantization may be implemented asfollows. In one example, the forward transform may be implemented byadding the chroma DC transform on top of the chroma transform. The inputmatrix may be formed by picking out DC coefficients from the 4transformed 4×4 blocks. For example, denoting the coefficients as X_(D),the transform may be computed according to the following equation.

$Y_{D} = {\left( {{\begin{bmatrix}1 & 1 \\1 & {- 1}\end{bmatrix}\begin{bmatrix}x_{D\; 00} & x_{D\; 01} \\x_{D\; 10} & x_{D\; 11}\end{bmatrix}}\begin{bmatrix}1 & 1 \\1 & {- 1}\end{bmatrix}} \right)//k_{p}}$

with k_(p)=k₉=1.

The 2×2 chroma DC quantization may performed according to the followingequation:

${{Y_{QQD}\left( {i,j} \right)} = \frac{\begin{bmatrix}{{{Y_{D}\left( {i,j} \right)} \cdot {Q\left( {{{QP}\mspace{14mu} \% \mspace{14mu} 6},0,0} \right)}} +} \\\left( {\left( {{{sgn}\left( {Y_{D}\left( {i,j} \right)} \right)} \cdot \left( {o_{CDC} + 1} \right) \cdot 2^{17 + {{QP}/6}}} \right)/16} \right)\end{bmatrix}}{2^{17 - 3 + {{QP}/6}}}},i,{j = {0\mspace{14mu} \ldots \mspace{14mu} 3}}$${Y_{QD}\left( {i,j} \right)} = \left\{ \begin{matrix}{0,} & {{{abs}\left( {Y_{QQD}\left( {i,j} \right)} \right)} \leq {7 + d_{CDC}}} \\{{{Y_{QQD}\left( {i,j} \right)}/8},} & {else}\end{matrix} \right.$

where O_(CDC)=0 . . . 7, d_(CDC)=0 . . . 15 (e.g., O_(CDC)=7,d_(CDC)=0).

The dynamic range specifications for each stage may be summarized in thefollowing TABLE 1:

TABLE 1 Precision Input bits Output bits Luma and chroma transform andquantization Forward transform 9 15 Quantization 15 10 De-quantization10 15 Inverse transform 15 9 Luma DC transform and quantizationtransform 13 16 Quantization 16 12 Inverse transform 12 12De-quantization 12 15 Chroma DC transform and quantization transform 1315 Quantization 15 11 Inverse transform 11 11 De-quantization 11 15

The value in each cell generally corresponds to a 9-bit input residual.

In another example, the present invention may be implemented in a VC1 (aSociety of Motion Picture and Television Engineers (SMPTE) standardbased on Microsoft WMV9) compliant encoder/decoder. The presentinvention may modify forward transform and quantization specificationsof the VC1 standard to provide for implementation of programmableoffsets and dead zones. In one example, the present invention may beimplemented as a stand alone device. In another example, the presentinvention may provide an implementation that re-uses MPEG2 or MPEG4hardware.

In one example, the forward quantization of a given coefficient at anindex (e.g., Idx) of a block may be implemented according to thefollowing pseudocode:

Quantizer = (InvQuantScale * QuantMat[Idx] + 0x8000) >> 16; Tmp =Coeffs[Idx] * Quantizer; /* Handle rounding */ if (Tmp < 0) {   Tmp +=((~Qrnd & 0xf) << 12 | 0xfff; } else {   Tmp += Qrnd << 12; }QCoeffs[Idx] = Tmp >> 16;where Quantizer represents the forward quantizer, InvQuantScalerepresents a scale factor for the block, QuantMat represents the forwardquantization matrix, Coeffs represents the blocks of coefficients, Qrndrepresents a rounding factor and QCoeffs represents a resultingquantized block. In one example, QuantMat[Idx] may be set to 16 and Qrndmay be set to a predetermined fixed value. In one example, the valueQrnd may be either 5 or 8 for intra pictures (I-pictures) and 0 or 1 forinter pictures. The particular value of Qrnd implemented may bedetermined based on user preference.

A programmable dead zone for VC1 may be implemented by varying theparameter Qrnd between a first predetermined value and a secondpredetermined value. In one example, Qrnd may be varied between 0 and 2̂4(or between 0 and 15 inclusive). Programmable independent coefficientoffsets for VC1 may be implemented by varying the parameterQuantMat[Idx] between a first predetermined value and a secondpredetermined value. The value of QuantMat[Idx] may be implemented, inone example, having (i) a range of up to 16 bits and (ii) a positivesign (e.g., 0 to (2̂16)−1). In one example, the value of QuantMat[Idx]may be varied between 0 and 31 inclusive.

The present invention may apply conventional MPEG-2 or MPEG-4 very largescale integrated (VLSI) implementations of quantization forstandard-based VC1 encoding. For example, MPEG-2 parameters may bevaried to apply programmable dead zones and offsets. In one example,MPEG-2 quantization matrices may be utilized in an alternativeimplementation of programmable offsets for VC1 quantization. Althoughthe present invention has been illustrated with an 8-bit video input,other bitdepths (e.g., 10-bit, 12-bit, etc.) of input video streams maybe implemented in accordance with the present invention. The presentinvention may also be implemented with other video formats (e.g., 4:2:2,4:4:4, etc.). The present invention may provide advantages for MainProfile, High Profile and VC1 by matching quantization decisions to thecoefficient distributions to improve rate-distortion performance ofencoded bitstreams.

The function performed by the present invention may be implemented usinga conventional general purpose digital computer programmed according tothe teachings of the present specification, as will be apparent to thoseskilled in the relevant art(s). Appropriate software coding can readilybe prepared by skilled programmers based on the teachings of the presentdisclosure, as will also be apparent to those skilled in the relevantart(s).

The present invention may also be implemented by the preparation ofASICs, FPGAs, or by interconnecting an appropriate network ofconventional component circuits, as is described herein, modificationsof which will be readily apparent to those skilled in the art(s).

The present invention thus may also include a computer product which maybe a storage medium including instructions which can be used to programa computer to perform a process in accordance with the presentinvention. The storage medium can include, but is not limited to, anytype of disk including floppy disk, optical disk, CD-ROM,magneto-optical disks, ROMs, RAMs, EPROMs, EEPROMs, Flash memory,magnetic or optical cards, or any type of media suitable for storingelectronic instructions.

While the invention has been particularly shown and described withreference to the preferred embodiments thereof, it will be understood bythose skilled in the art that various changes in form and details may bemade without departing from the spirit and scope of the invention.

1. An apparatus comprising: an encoder circuit configured to generate aplurality of coefficient values and motion vectors in response to avideo stream, a first control signal, a second control signal, and anumber of quantized values; a control circuit configured to (i) generatesaid first control signal, said second control signal, and a quantizerindex signal and (ii) set two or more quantization dead zones and two ormore offsets to different values, wherein said quantization dead zonesand said offsets are independently programmable; and a quantizer circuitconfigured to generate said number of quantized values in response tosaid coefficient values, said quantizer index signal, said two or morequantization dead zones and said two or more offsets, wherein a firstcoefficient value is quantized using a first quantization dead zone anda first offset, a second coefficient value is quantized using a secondquantization dead zone and a second offset, said first and secondquantization dead zones have different values, said first and secondoffsets have different values, and quantization calculations determiningeach quantized value take into account respective quantization deadzones and offsets.
 2. The apparatus according to claim 1, wherein:generating each quantized value comprises (i) scaling a correspondingcoefficient value based upon a respective quantizer coefficient and arespective offset value, (ii) setting said quantized value to the scaledcoefficient value when a magnitude of said scaled coefficient value isgreater than a threshold based upon a respective dead zone value, andsetting said quantized value to zero when the magnitude of said scaledcoefficient value is not greater than the threshold value based upon therespective dead zone value.
 3. The apparatus according to claim 1,wherein: 4×4 luma and chroma quantization is performed according to afirst equation comprising${{Y_{QQ}\left( {i,j} \right)} = \frac{\begin{bmatrix}{{{Y\left( {i,j} \right)} \cdot {Q\left( {{{QP}\mspace{14mu} \% \mspace{14mu} 6},i,j} \right)}} +} \\\left( {\left( {\left( {{{Off}\left( {i,j} \right)} + 1} \right) \cdot 2^{17 + {{QP}/6}}} \right)/16} \right)\end{bmatrix}}{2^{17 - 3 + {{QP}/6}}}},i,{j = {0\mspace{14mu} \ldots \mspace{14mu} 3}}$${Y_{Q}\left( {i,j} \right)} = \left\{ \begin{matrix}{0,} & {{{if}\mspace{14mu} {{abs}\left( {Y_{QQD}\left( {i,j} \right)} \right)}} \leq {7 + {{DZ}\left( {i,j} \right)}}} \\{{{Y_{QQD}\left( {i,j} \right)}/8},} & {else}\end{matrix} \right.$ where Y represents the coefficient values, Qrepresents the quantization coefficients, Off(i,j) represents the offsetvalues and DZ(i,j) represents the quantization dead zone values; 4×4luma DC quantization is performed according to a second equationcomprising ${{Y_{QQD}\left( {i,j} \right)} = \frac{\begin{bmatrix}{{{Y_{D}\left( {i,j} \right)} \cdot {Q\left( {{{QP}\mspace{14mu} \% \mspace{14mu} 6},0,0} \right)}} +} \\\left( {\left( {{{sgn}\left( {Y_{D}\left( {i,j} \right)} \right)} \cdot \left( {o_{LDC} + 1} \right) \cdot 2^{17 + {{QP}/6}}} \right)/16} \right)\end{bmatrix}}{2^{17 - 3 + {{QP}/6}}}},i,{j = {0\mspace{14mu} \ldots \mspace{14mu} 3}}$${Y_{QD}\left( {i,j} \right)} = \left\{ \begin{matrix}{0,} & {{{abs}\left( {Y_{QQD}\left( {i,j} \right)} \right)} \leq {7 + d_{LDC}}} \\{{{Y_{QQD}\left( {i,j} \right)}/8},} & {else}\end{matrix} \right.$ where O_(LDC)=0 . . . 7 has a value ranging fromzero through 7 and d_(LDC) has a value ranging from zero through 15; and2×2 chroma DC quantization is performed according to a third equationcomprising ${{Y_{QQD}\left( {i,j} \right)} = \frac{\begin{bmatrix}{{{Y_{D}\left( {i,j} \right)} \cdot {Q\left( {{{QP}\mspace{14mu} \% \mspace{14mu} 6},0,0} \right)}} +} \\\left( {\left( {{{sgn}\left( {Y_{D}\left( {i,j} \right)} \right)} \cdot \left( {o_{CDC} + 1} \right) \cdot 2^{17 + {{QP}/6}}} \right)/16} \right)\end{bmatrix}}{2^{17 - 3 + {{QP}/6}}}},i,{j = {0\mspace{14mu} \ldots \mspace{14mu} 3}}$${Y_{QD}\left( {i,j} \right)} = \left\{ \begin{matrix}{0,} & {{{abs}\left( {Y_{QQD}\left( {i,j} \right)} \right)} \leq {7 + d_{CDC}}} \\{{{Y_{QQD}\left( {i,j} \right)}/8},} & {else}\end{matrix} \right.$ where O_(CDC) has a value ranging from zerothrough 7 and d_(CDC) has a value ranging from zero through
 15. 4. Theapparatus according to claim 1, wherein said control circuit is furtherconfigured to provide a plurality of dead zone threshold values andoffset threshold values.
 5. The apparatus according to claim 1, whereinsaid control circuit is configured to provide a plurality of parametersets.
 6. The apparatus according to claim 5, wherein said plurality ofparameter sets comprises a plurality of parameter pairs.
 7. Theapparatus according to claim 6, wherein said plurality of parameterpairs each comprise an offset parameter and a dead zone parameter. 8.The apparatus according to claim 5, wherein said plurality of parametersets comprises 16 parameter sets configured for either 8×8 or 4×4 lumaand chroma quantization, one parameter set configured for 2×2 chroma DCquantization and one parameter set configured for 4×4 luma DCquantization.
 9. The apparatus according to claim 1, wherein saidencoder circuit comprises a VC1 compliant encoder/decoder (CODEC) andsaid quantizer circuit is configured to implement a variable dead zonecomprising a rounding factor configured to vary between a firstpredetermined value and a second predetermined value.
 10. The apparatusaccording to claim 1, wherein said quantizer circuit is furtherconfigured to implement a programmable offset for standard-based VC1encoding, wherein a forward quantization matrix parameter is variablebetween a first predetermined value and a second predetermined value.11. A video encoder comprising: means for generating a plurality ofcoefficient values and motion vectors in response to a video stream, afirst control signal, a second control signal, and a number of quantizedvalues; means for (i) generating said first control signal, said secondcontrol signal, and a quantizer index signal and (ii) setting two ormore quantization dead zones and two or more offsets to differentvalues, wherein said two or more quantization dead zones and said two ormore offsets are independently programmable; means for generating saidnumber of quantized values in response to said coefficient values, saidquantizer index signal, said two or more quantization dead zones andsaid two or more offsets, wherein a first coefficient value is quantizedusing a first quantization dead zone and a first offset, a secondcoefficient value is quantized using a second quantization dead zone anda second offset, said first and second quantization dead zones havedifferent values, said first and second offsets have different values,and generating each quantized value comprises (i) scaling acorresponding coefficient value based upon a respective quantizercoefficient and a respective offset value, (ii) setting said quantizedvalue to the scaled coefficient value when a magnitude of said scaledcoefficient value is greater than a threshold based upon a respectivedead zone value, and setting said quantized value to zero when themagnitude of said scaled coefficient value is not greater than thethreshold value based upon the respective dead zone value.
 12. A methodfor encoding video comprising: generating a plurality of coefficientvalues and motion vectors with a video encoder in response to a videostream, a first control signal, a second control signal, and a number ofquantized values; generating said first control signal, said secondcontrol signal, and a quantizer index signal; setting two or morequantization dead zones and two or more offsets to different values,wherein said two or more quantization dead zones and said two or moreoffsets are independently programmable; and generating said number ofquantized values in said video encoder in response to said coefficientvalues, said quantizer index signal, said two or more quantization deadzones and said two or more offsets, wherein a first coefficient value isquantized using a first quantization dead zone and a first offset, asecond coefficient value is quantized using a second quantization deadzone and a second offset, said first and second quantization dead zoneshave different values, said first and second offsets have differentvalues, and quantization calculations determining each quantized valuetake into account respective quantization dead zones and offsets. 13.The method according to claim 12, further comprising: generating eachquantized value by (i) scaling a corresponding coefficient value basedupon a respective quantizer coefficient and a respective offset value,(ii) setting said quantized value to the scaled coefficient value when amagnitude of said scaled coefficient value is greater than a thresholdbased upon a respective dead zone value, and setting said quantizedvalue to zero when the magnitude of said scaled coefficient value is notgreater than the threshold value based upon the respective dead zonevalue.
 14. The method according to claim 12, further comprising:providing a plurality of parameter sets.
 15. The method according toclaim 14, wherein said plurality of parameter sets comprises a pluralityof parameter pairs, wherein said plurality of parameter pairs eachcomprise an offset parameter and a dead zone parameter.
 16. The methodaccording to claim 14, wherein said plurality of parameter setscomprises 16 parameter sets configured for either 8×8 or 4×4 luma andchroma quantization, one parameter set configured for 2×2 chroma DCquantization and one parameter set configured for 4×4 luma DCquantization.
 17. The method according to claim 12, wherein said videoencoder is implemented as a VC1 compliant encoder/decoder (CODEC) and aquantizer circuit configured to implement one or more of (a) a variabledead zone comprising a rounding factor configured to vary between afirst predetermined value and a second predetermined value, (b) aprogrammable offset for standard-based VC1 encoding, wherein a forwardquantization matrix parameter is variable between a first predeterminedvalue and a second predetermined value and (c) a variable dead zonecomprising a rounding factor configured to vary between a firstpredetermined value and a second predetermined value, and a programmableoffset for standard base VC1 encoding, wherein a forward quantizationmatrix parameter is variable between a third predetermined value and afourth predetermined value.
 18. The method according to claim 12,wherein: 4×4 luma and chroma quantization is performed according to afirst equation comprising${{Y_{QQ}\left( {i,j} \right)} = \frac{\begin{bmatrix}{{{Y\left( {i,j} \right)} \cdot {Q\left( {{{QP}\mspace{14mu} \% \mspace{14mu} 6},i,j} \right)}} +} \\\left( {\left( {\left( {{{Off}\left( {i,j} \right)} + 1} \right) \cdot 2^{17 + {{QP}/6}}} \right)/16} \right)\end{bmatrix}}{2^{17 - 3 + {{QP}/6}}}},i,{j = {0\mspace{14mu} \ldots \mspace{14mu} 3}}$${Y_{Q}\left( {i,j} \right)} = \left\{ \begin{matrix}{0,} & {{{if}\mspace{14mu} {{abs}\left( {Y_{QQD}\left( {i,j} \right)} \right)}} \leq {7 + {{DZ}\left( {i,j} \right)}}} \\{{{Y_{QQD}\left( {i,j} \right)}/8},} & {else}\end{matrix} \right.$ where Y represents the coefficient values, Qrepresents the quantization coefficients, Off(i,j) represents the offsetvalues and DZ(i,j) represents the quantization dead zone values; 4×4luma DC quantization is performed according to a second equationcomprising ${{Y_{QQD}\left( {i,j} \right)} = \frac{\begin{bmatrix}{{{Y_{D}\left( {i,j} \right)} \cdot {Q\left( {{{QP}\mspace{14mu} \% \mspace{14mu} 6},0,0} \right)}} +} \\\left( {\left( {{{sgn}\left( {Y_{D}\left( {i,j} \right)} \right)} \cdot \left( {o_{LDC} + 1} \right) \cdot 2^{17 + {{QP}/6}}} \right)/16} \right)\end{bmatrix}}{2^{17 - 3 + {{QP}/6}}}},i,{j = {0\mspace{14mu} \ldots \mspace{14mu} 3}}$${Y_{QD}\left( {i,j} \right)} = \left\{ \begin{matrix}{0,} & {{{abs}\left( {Y_{QQD}\left( {i,j} \right)} \right)} \leq {7 + d_{LDC}}} \\{{{Y_{QQD}\left( {i,j} \right)}/8},} & {else}\end{matrix} \right.$ where O_(LDC)=0 . . . 7 has a value ranging fromzero through 7 and d_(LDC) has a value ranging from zero through 15; and2×2 chroma DC quantization is performed according to a third equationcomprising ${{Y_{QQD}\left( {i,j} \right)} = \frac{\begin{bmatrix}{{{Y_{D}\left( {i,j} \right)} \cdot {Q\left( {{{QP}\mspace{14mu} \% \mspace{14mu} 6},0,0} \right)}} +} \\\left( {\left( {{{sgn}\left( {Y_{D}\left( {i,j} \right)} \right)} \cdot \left( {o_{CDC} + 1} \right) \cdot 2^{17 + {{QP}/6}}} \right)/16} \right)\end{bmatrix}}{2^{17 - 3 + {{QP}/6}}}},i,{j = {0\mspace{14mu} \ldots \mspace{14mu} 3}}$${Y_{QD}\left( {i,j} \right)} = \left\{ \begin{matrix}{0,} & {{{abs}\left( {Y_{QQD}\left( {i,j} \right)} \right)} \leq {7 + d_{CDC}}} \\{{{Y_{QQD}\left( {i,j} \right)}/8},} & {else}\end{matrix} \right.$ where O_(CDC) has a value ranging from zerothrough 7 and d_(CDC) has a value ranging from zero through
 15. 19. Themethod according to claim 18, wherein: sixteen 3-bit programmableoffsets O_(ij) for 4×4 luma and chroma quantization are utilizedaccording to a first equationOff  (i, j) = sgn(Y(i, j)) ⋅ O₁(i, j), where$O_{1} = \begin{bmatrix}o_{00} & o_{01} & o_{02} & o_{03} \\o_{10} & o_{11} & o_{12} & o_{13} \\o_{20} & o_{21} & o_{22} & o_{23} \\o_{30} & o_{31} & o_{32} & o_{33}\end{bmatrix}$ where O_(ij) has a value ranging from zero through seven;and sixteen 4-bit programmable dead zones d_(ij) for 4×4 luma and chromaquantization are utilized according to a second equationD Z(i, j) = D₁(i, j), where ${D_{1} = \begin{bmatrix}d_{00} & d_{01} & d_{02} & d_{03} \\d_{10} & d_{11} & d_{12} & d_{13} \\d_{20} & d_{21} & d_{22} & d_{23} \\d_{30} & d_{31} & d_{32} & d_{33}\end{bmatrix}},$ where d_(ij) has a value ranging from zero throughfifteen.
 20. The method according to claim 18, wherein: sixteen 3-bitprogrammable offsets O_(ij) for 8×8 luma and chroma quantization areutilized according to a third equationOff  (i, j) = sgn(Y(i, j)) ⋅ O₁(i, j), where$O_{1} = \begin{bmatrix}o_{00} & o_{01} & o_{02} & o_{02} & o_{03} & o_{03} & o_{03} & o_{03} \\o_{10} & o_{11} & o_{12} & o_{12} & o_{13} & o_{13} & o_{13} & o_{13} \\o_{20} & o_{21} & o_{22} & o_{22} & o_{23} & o_{23} & o_{23} & o_{23} \\o_{20} & o_{21} & o_{22} & o_{22} & o_{23} & o_{23} & o_{23} & o_{23} \\o_{30} & o_{31} & o_{32} & o_{32} & o_{33} & o_{33} & o_{33} & o_{33} \\o_{30} & o_{31} & o_{32} & o_{32} & o_{33} & o_{33} & o_{33} & o_{33} \\o_{30} & o_{31} & o_{32} & o_{32} & o_{33} & o_{33} & o_{33} & o_{33} \\o_{30} & o_{31} & o_{32} & o_{32} & o_{33} & o_{33} & o_{33} & o_{33}\end{bmatrix}$ and sixteen 4-bit programmable dead zones d_(ij) for 8×8luma and chroma quantization are utilized according to a fourth equationDZ(i, j) = D₁(i, j), where $D_{1} = \begin{bmatrix}d_{00} & d_{00} & d_{00} & d_{00} & d_{01} & d_{01} & d_{02} & d_{03} \\d_{00} & d_{00} & d_{00} & d_{00} & d_{01} & d_{01} & d_{02} & d_{03} \\d_{00} & d_{00} & d_{00} & d_{00} & d_{01} & d_{01} & d_{02} & d_{03} \\d_{00} & d_{00} & d_{00} & d_{00} & d_{01} & d_{01} & d_{02} & d_{03} \\d_{10} & d_{10} & d_{10} & d_{10} & d_{11} & d_{11} & d_{12} & d_{13} \\d_{10} & d_{10} & d_{10} & d_{10} & d_{11} & d_{11} & d_{12} & d_{13} \\d_{20} & d_{20} & d_{20} & d_{20} & d_{21} & d_{21} & d_{22} & d_{23} \\d_{30} & d_{30} & d_{30} & d_{30} & d_{31} & d_{31} & d_{32} & d_{33}\end{bmatrix}$ where the values in the square brackets correspond to therespective values used for 4×4 luma and chroma quantization, but i and jrange from zero to seven.